package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author ljc
 * @version V1.0
 * @date 2025-03-05 20:12
 */
@Mapper
public interface MemberReservationMapper extends BaseMapper<Reservation> {

    List<Reservation> getCancelledReservationCount(@Param("userId") Long userId, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    List<ReservationVo> countByTime(LocalDateTime dateTime);

    List<ReservationVo> countByTime(LocalDateTime dateTime, LocalDateTime startTime, LocalDateTime endTime);
}
